package com.zz.utils;

import com.zz.service.ExamSubmissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class ScheduledTasks {
    @Autowired
    private ExamSubmissionService examSubmissionService;

    // 每5分钟检查一次待处理的提交
    @Scheduled(fixedRate = 300000)
    public void processPendingSubmissions() {
        examSubmissionService.processPendingSubmissions();
    }
}